# 基础数据类型注解
import json
import random

var1:int =10
var2:str ="李健奇"
var3:bool =False

# 类对象类型注解
class Student:
    pass
stu:Student = Student()

# 基础容器类型注解
my_list:list = [1,2,3]
my_tuple:tuple=(1,2,3)
my_dict:dict={"name":"lijianqi"}

# 容器类型详细注解
my_list1:list[int] = [1,2,3]
my_tuple1:tuple[int,str,bool]=(1,"jianqi",False)
my_dict1:dict[str,int]={"age":22}

# 在注释中进行类型注解
var_1 = random.randint(1,10)        # type:int
var_2 = json.loads('{name}:{lijianqi}')        # type:dict[str,str]

def func():
    return 1
var_3 = func()      # type:int